//
//  OrderCreateinfoTableViewCell.m
//  智积分
//
//  Created by apple on 2018/5/16.
//  Copyright © 2018年 Cynic. All rights reserved.
//

#import "OrderCreateinfoTableViewCell.h"

@implementation OrderCreateinfoTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    UIView *topdisview= [[UIView alloc]initWithFrame:CGRectMake(0, 0, cx_wid, 10)];
    topdisview.backgroundColor = [CXSinglerModel colorWithHex:@"f3f4f6" alpha:1];
    [self.contentView addSubview:topdisview];
    NSArray *titles = @[@"订单编号",@"创建时间",@"下单时间"];
    for (NSInteger index = 0; index < titles.count; index ++) {
        [UILabel CXCreateLabelwithFrame:CGRectMake(12, 40 * index + 22, 60, 16) withtTitle:titles[index] inColor:[UIColor clearColor] withHasBottomLayer:NO withbottomlayerHit:0 withBottomLayercolor:[UIColor clearColor] withLabelfont:14 withlabelTextColor:[CXSinglerModel colorWithHex:@"666666" alpha:1] withReturnLabel:NO beyoundview:self.contentView];
        UILabel *rightlabel = [UILabel CXCreateLabelwithFrame:CGRectMake(78, 40 * index + 22, cx_wid - 12 - 78, 16) withtTitle:@"" inColor:[UIColor clearColor] withHasBottomLayer:NO withbottomlayerHit:0 withBottomLayercolor:[UIColor clearColor] withLabelfont:14 withlabelTextColor:[UIColor blackColor] withReturnLabel:YES beyoundview:self.contentView];
        if (index == titles.count - 1) {
            _starttime = rightlabel;
        }
        else if (index == 1){
            _createtime = rightlabel;
        }
        else{
            _orderid = rightlabel;
        }
    }
    for (NSInteger index = 0; index < titles.count - 1; index ++) {
        UIView *layerview = [[UIView alloc] initWithFrame:CGRectMake(12, 40 * (index + 1) + 9, cx_wid - 24, 1)];
        layerview.backgroundColor = [CXSinglerModel colorWithHex:@"f3f4f6" alpha:1];
        [self.contentView addSubview:layerview];
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
